import React from 'react';
import {
  Linking,
  Alert,
} from 'react-native';
import BaseAction from './BaseAction';

import Constants from '../../common/Constants';

export default class CommonCallTellAction extends BaseAction {
  constructor(props) {
    super(props);

    this.moduleType = Constants.MODULE_TYPE.COMMON;
    this.name = "CommonCallTellAction";
  }

  finish(phoneNum) {
    Alert.alert('提示', "确定要拨打电话吗？\n" + phoneNum, [
        {
          text:'确定',onPress:()=>{
            Linking.openURL("tel:" + phoneNum);
          }
        },
        {
          text:'再考虑考虑',onPress:()=>{}
        },
      ])
  }
}
